/**
 * Class: SparklingDot
 *
 * Purpose: 
 *
 * Created: Jan 27, 2010 @ 9:37:10 AM
 * @author Ken Scott
 */
package org.openfantasia.ps.actor;

import org.openfantasia.ps.particle.Particle;
import org.openfantasia.ui.PColor;
import org.openfantasia.ui.PFrame;

public class SparklingDot extends Actor {

	public SparklingDot(PFrame frame) {
		super(frame);
	}


	public void draw(Particle particle) {
		PColor color = PColor.random();
		color = color.scale((float) particle.getBrightness());
		color = color.opacify((float) particle.getOpacity());
		frame.stroke(color);
		frame.point(particle.getPosition());
	}
}